<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="my" uri="/mytags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/asserts/bootstrap-3.3.7-dist/css/bootstrap.min.css" />

<!-- js插件 -->
<script src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
<script
	src="${pageContext.request.contextPath}/asserts/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/asserts/bootstrapValidate/css/bootstrapValidator.min.css" />
<script
	src="${pageContext.request.contextPath}/asserts/bootstrapValidate/js/bootstrapValidator.min.js"></script>

</head>
<body>
	<div>
		<!-- 导航 -->
		<ol class="breadcrumb">
			<li><i class="fa fa-comment"></i> 国家资助管理</li>
		</ol>
		<div class="container">
			<div class="row">
				<form
					action="${pageContext.request.contextPath}/countrysub/updateByCountrySub"
					method="post" class="form-horizontal">
					<!-- 受助项目-->
					<input type="text" name="id" style="display: none"
						value="${Sub.id}" class="form-control" /> <input type="text"
						id="shouzhu" style="display: none" value="${Sub.project}"
						class="form-control" />
					<div class="form-group">
						<label class="control-label col-md-3">受助项目：</label>
						<div class="col-md-8">
							<select name="project" class="form-control">
								<option id="project1" value="学前教育资助">学前教育资助</option>
								<option id="project2" value="一补">一补</option>
								<option id="project3" value="普通高中国家助学金">普通高中国家助学金</option>
								<option id="project4" value="普通高中免学杂费">普通高中免学杂费</option>
								<option id="project5" value="中职国家助学金">中职国家助学金</option>
								<option id="project6" value="中职免学费">中职免学费</option>
								<option id="project7" value="城市低保非寄宿生县级资助">城市低保非寄宿生县级资助</option>
								<option id="project8" value="城市低保高中免学费">城市低保高中免学费</option>
								<option id="project9" value="精准扶贫高中复读学生免学费">精准扶贫高中复读学生免学费</option>
								<option id="project10" value="精准扶贫高中复读学生助学金">精准扶贫高中复读学生助学金</option>
								<option id="project11" value="因疫致贫困学生资助">因疫致贫困学生资助</option>
								<option id="project12" value="大学新生入学资助">大学新生入学资助</option>
								<option id="project13" value="普通高中滋蕙计划">普通高中滋蕙计划</option>
							</select>
						</div>
					</div>
					<!-- 学校-->
					<div class="form-group">
						<label class="control-label col-md-3">选择学校：</label>
						<div class="col-md-8">
							<select name="schid" class="form-control">
							<option value="">请选择</option>
										 	<c:forEach var="school" items="${schoolList}">
										 		<option value="${school.schid}" <c:if test="${school.schid==Sub.schid}">selected="selected"</c:if>>${school.name}(${school.level})</option>
										 	</c:forEach>
							</select>
						</div>
					</div>

					<div class="form-group">
						<label class="control-label col-md-3">姓名：</label>
						<div class="col-md-8">
							<input type="text" name="name" placeholder="请输入姓名"
								class="form-control" value="${Sub.name}" />
						</div>
					</div>
					<div class="form-group">
						<input type="text" id="xingbie" style="display: none"
							value="${Sub.sex}" class="form-control" /> <label
							class="control-label col-md-3">性别：</label>
						<div class="col-md-8">
							<div class="radio">
								<label> <input type="radio" name="sex" value="男"
									id="nan"> 男
								</label> <label> <input type="radio" name="sex" value="女"
									id="nv"> 女
								</label>
							</div>

						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">年级：</label>
						<div class="col-md-8">
							<input type="text" name="grade" placeholder="请输入年级（如  一年级）"
								class="form-control" value="${Sub.grade}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">班级：</label>
						<div class="col-md-8">
							<input type="text" name="classes" placeholder="请输入班级"
								class="form-control" value="${Sub.classes}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">身份证号：</label>
						<div class="col-md-8">
							<input type="text" name="idcard" placeholder="请输入身份证号"
								class="form-control" value="${Sub.idcard}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">学籍号：</label>
						<div class="col-md-8">
							<input type="text" name="stucode" placeholder="请输入学籍号"
								class="form-control" value="${Sub.stucode}" />
						</div>
					</div>
					<div class="form-group">
					  <label class="control-label col-md-3">受助类别：</label>
						<div class="col-md-8">
							<select name="type" id="leibie" class="form-control">
								<option  value="建档立卡贫困家庭子女" <c:if test="${Sub.type=='建档立卡贫困家庭子女'}">selected</c:if>>建档立卡贫困家庭子女</option>
								<option  value="农村低保家庭子女" <c:if test="${Sub.type=='农村低保家庭子女'}">selected</c:if>>农村低保家庭子女</option>
								<option  value="城市低保家庭子女" <c:if test="${Sub.type=='城市低保家庭子女'}">selected</c:if>>城市低保家庭子女</option>
								<option  value="特困人员" <c:if test="${Sub.type=='特困人员'}">selected</c:if>>特困人员</option>
								<option  value="孤儿" <c:if test="${Sub.type=='孤儿'}">selected</c:if>>孤儿</option>
								<option  value="烈士子女" <c:if test="${Sub.type=='烈士子女'}">selected</c:if>>烈士子女</option>
								<option  value="残疾学生" <c:if test="${Sub.type=='残疾学生'}">selected</c:if>>残疾学生</option>
								<option   value="其他家庭经济困难学生" <c:if test="${Sub.type=='其他家庭经济困难学生'}">selected</c:if>>其他家庭经济困难学生</option>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">详细原因：</label>
						<div class="col-md-8">
							<input type="text" name="descinfo" placeholder="请输入详细原因"
								class="form-control" value="${Sub.descinfo}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">省：</label>
						<div class="col-md-8">
							<input type="text" name="province" placeholder="请输入省（如  湖北省）"
								class="form-control" value="${Sub.province}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">市：</label>
						<div class="col-md-8">
							<input type="text" name="city" placeholder="请输入市（如  武汉市）"
								class="form-control" value="${Sub.city}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">县：</label>
						<div class="col-md-8">
							<input type="text" name="xian" placeholder="请输入县"
								class="form-control" value="${Sub.xian}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">镇：</label>
						<div class="col-md-8">
							<input type="text" name="town" placeholder="请输入镇"
								class="form-control" value="${Sub.town}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">村：</label>
						<div class="col-md-8">
							<input type="text" name="country" placeholder="请输入村"
								class="form-control" value="${Sub.country}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">村组：</label>
						<div class="col-md-8">
							<input type="text" name="countrygroup" placeholder="请输入村组"
								class="form-control" value="${Sub.countrygroup}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">家长姓名：</label>
						<div class="col-md-8">
							<input type="text" name="parentname" placeholder="请输入家长姓名"
								class="form-control" value="${Sub.parentname}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">与学生关系：</label>
						<div class="col-md-8">
							<input type="text" name="relation" placeholder="请输入与学生关系"
								class="form-control" value="${Sub.relation}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">联系电话：</label>
						<div class="col-md-8">
							<input type="text" name="phone" placeholder="请输入联系电话"
								class="form-control" value="${Sub.phone}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">银行卡或存折号：</label>
						<div class="col-md-8">
							<input type="text" name="bankno" placeholder="请输入银行卡"
								class="form-control" value="${Sub.bankno}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">银行名称：</label>
						<div class="col-md-8">
							<input type="text" name="bankname" placeholder="请输入银行名称"
								class="form-control" value="${Sub.bankname}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3">资助金额或免学费金额（元）：</label>
						<div class="col-md-8">
							<input type="text" name="amount" placeholder="请输入资助金额"
								class="form-control" value="${Sub.amount}" />
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-3"> </label>
						<div class="col-md-8">
							<div class="col-md-6">
								<button class="btn btn-primary btn-block">录入</button>
							</div>
							<div class="col-md-6">
								<button class="btn btn-danger btn-block" type="reset">取消</button>
							</div>
						</div>
					</div>

				</form>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			if ($("#xingbie").val() == "男") {
				$("#nan").attr("checked", "checked");
			} else {
				$("#nv").attr("checked", "checked");
			}

			if ($("#shouzhu").val() == "学前教育资助") {
				$("#project1").attr("selected", "selected");
			} else if ($("#shouzhu").val() == "一补") {
				$("#project2").attr("selected", "selected");
			} else if ($("#shouzhu").val() == "普通高中国家助学金") {
				$("#project3").attr("selected", "selected");
			} else if ($("#shouzhu").val() == "普通高中免学杂费") {
				$("#project4").attr("selected", "selected");
			} else if ($("#shouzhu").val() == "中职国家助学金") {
				$("#project5").attr("selected", "selected");
			} else if ($("#shouzhu").val() == "中职免学费") {
				$("#project6").attr("selected", "selected");
			}else if ($("#shouzhu").val() == "城市低保非寄宿生县级资助") {
				$("#project7").attr("selected", "selected");
			}else if ($("#shouzhu").val() == "城市低保高中免学费") {
				$("#project8").attr("selected", "selected");
			}else if ($("#shouzhu").val() == "精准扶贫高中复读学生免学费") {
				$("#project9").attr("selected", "selected");
			}else if ($("#shouzhu").val() == "精准扶贫高中复读学生助学金") {
				$("#project10").attr("selected", "selected");
			}else if ($("#shouzhu").val() == "因疫致贫困学生资助") {
				$("#project11").attr("selected", "selected");
			}else if ($("#shouzhu").val() == "大学新生入学资助") {
				$("#project12").attr("selected", "selected");
			}else if ($("#shouzhu").val() == "普通高中滋蕙计划") {
				$("#project13").attr("selected", "selected");
			}
			 
		})
		
		 document.documentElement.style.overflowY = 'hidden';
	</script>

</body>
</html>
